home *** CD-ROM | disk | FTP | other *** search
/ Pro-Cent Games: For Only 1 Cent! / Pro Cent Games.bin / DoubleBreak.exe / scripts / frame_2 / PlaceObject2_13_72 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Encoding:
Text File  |  2003-02-23  |  417 b   |  26 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.gameOn)
  3.    {
  4.       if(_root.useMouseOn)
  5.       {
  6.          this._x = _root._xmouse;
  7.       }
  8.       else if(Key.isDown(Key.LEFT))
  9.       {
  10.          this._x -= 15;
  11.       }
  12.       else if(Key.isDown(Key.RIGHT))
  13.       {
  14.          this._x += 15;
  15.       }
  16.    }
  17.    if(this._x < 0)
  18.    {
  19.       this._x = 0;
  20.    }
  21.    else if(400 < this._x)
  22.    {
  23.       this._x = 400;
  24.    }
  25. }
  26.